﻿using System;

namespace VioletDevelopmentLaboratory.Net.Web.WebControls
{
	public class VWebControlDesigner : System.Web.UI.Design.ControlDesigner
	{
		public override String GetDesignTimeHtml()
		{
			String html = "<table border=\"1\" cellspacing=\"0\" cellpadding=\"5\">";
			html += "<tr><td style=\"color : #000000; background-color : #eaedf1;\">{0}</td></tr>";
			html += "<tr><td style=\"color : #ffffff; background-color : #561d47; font-size : small; text-align : center;\">Violet Development Laboratory.</td></tr></table>";

			try
			{
				return String.Format(html, base.GetDesignTimeHtml());
			}
			catch (Exception e)
			{
				return String.Format(html, this.GetErrorDesignTimeHtml(e));
			}
		}

		protected override String GetErrorDesignTimeHtml(Exception ex)
		{
			return ex.Message;
		}
	}
}